* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", sans-serif;
}

.chat-container {
    display: flex;
    height: 100vh;
    background: #f5f5f5;
}

/* 左侧导航 */
.left-sidebar {
    width: 240px;
    background: #fff;
    border-right: 1px solid #e7e7e7;
    padding: 20px;
}

.nav-item {
    padding: 12px;
    margin: 8px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.nav-item.active {
    background: #f4f4f4;
    color: #00aeec;
}

/* 消息列表 */
.message-list {
    flex: 1;
    max-width: 400px;
    background: #fff;
    border-right: 1px solid #e7e7e7;
    overflow-y: auto;
}

.message-item {
    display: flex;
    padding: 16px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}

.message-item.unread {
    background: #f8fdff;
    border-left: 3px solid #00aeec;
}

.avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
}

.content {
    flex: 1;
    min-width: 0;
}

.header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.username {
    font-weight: 500;
    color: #181818;
}

.time {
    color: #999;
    font-size: 0.9em;
}

.preview {
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tag {
    color: #00aeec;
    margin-left: 4px;
}

/* 右侧聊天窗口 */
.chat-window {
    flex: 2;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

.user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f9f9f9;
}

.message {
    margin: 12px 0;
    display: flex;
    flex-direction: column;
    max-width: 80%;
}

.message.self {
    align-self: flex-end;
}

.bubble {
    padding: 12px 16px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.message.self .bubble {
    background: #00aeec;
    color: white;
}

.input-area {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 12px;
    background: #fff;
}

textarea {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    resize: none;
    height: 80px;
    font-size: 14px;
}

button {
    background: #00aeec;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.3s;
}

button:hover {
    opacity: 0.9;
}